using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace PBR
{
    public partial class PropertiesControl : UserControl
    {
        private MainForm mainForm;
        private Scene scene;
        private DataSet ds;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="scene"></param>
        /// <param name="mainForm"></param>
        public PropertiesControl(Scene scene, MainForm mainForm)
        {
            InitializeComponent();

            this.scene = scene;
            this.mainForm = mainForm;

            //painterBindingSource.Add(scene.Renderer.Painter);
            propertiesDataGridView.DataSource = mainForm.PropertiesBindingSource;
            //painterBindingSource.ResetBindings(false);
            
            //// Create the data set and table
            //ds = new DataSet("Properties");
            //DataTable dataTable = new DataTable("Paint");
            //DataColumn col1 = new DataColumn("Item");
            //DataColumn col2 = new DataColumn("Value");
            //dataTable.Columns.Add(col1);
            //dataTable.Columns.Add(col2);
            
            //DataRow newRow = dataTable.NewRow();
            //newRow["Item"] = "test";
            //newRow["Value"] = "test2";
            //dataTable.Rows.Add(newRow);

            //newRow = dataTable.NewRow();
            //newRow["Item"] = "test3";
            //newRow["Value"] = "test4";
            //dataTable.Rows.Add(newRow);

            //ds.AcceptChanges();
            //ds.Tables.Add(dataTable);

            //propertiesDataGridView.DataSource = ds;
            //propertiesDataGridView.Refresh();
        }

        private void propertiesDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }
    }
}
